A rendering context, attached to a graphic window to present to the screen. More...
Public Member Functions | |
| RenderContext () | |
| virtual | ~RenderContext () |
| Texture * | getBackBuffer () const |
| Texture * | getDepthBuffer () const |
| Viewport * | getViewport () const |
| Compositor * | getCompositor () const |
| int | getContextWidth () const |
| int | getContextHeight () const |
| bool | isWindowFocused () const |
| nkWinUi::GraphicsWindow * | getAttachedWin () const |
| bool | getOwnsWindow () const |
| void | setCompositor (Compositor *value) |
| void | setOwnsWindow (bool value) |
| virtual void | setGammaCorrected (bool value)=0 |
| virtual void | initialize (nkWinUi::GraphicsWindow *window)=0 |
| virtual void | swap ()=0 |
| virtual void | refreshBufferSize (unsigned int width=0, unsigned int height=0)=0 |
| virtual void | refreshViewportSize () |
A rendering context, attached to a graphic window to present to the screen.
| nkGraphics::RenderContext::RenderContext | ( | ) |
Constructor. See RenderContextManager::createRenderContext() and derived.
|
virtual |
Destructor.
| Texture* nkGraphics::RenderContext::getBackBuffer | ( | ) | const |
| Texture* nkGraphics::RenderContext::getDepthBuffer | ( | ) | const |
| Viewport* nkGraphics::RenderContext::getViewport | ( | ) | const |
| Compositor* nkGraphics::RenderContext::getCompositor | ( | ) | const |
| int nkGraphics::RenderContext::getContextWidth | ( | ) | const |
| int nkGraphics::RenderContext::getContextHeight | ( | ) | const |
| bool nkGraphics::RenderContext::isWindowFocused | ( | ) | const |
| nkWinUi::GraphicsWindow* nkGraphics::RenderContext::getAttachedWin | ( | ) | const |
| bool nkGraphics::RenderContext::getOwnsWindow | ( | ) | const |
| void nkGraphics::RenderContext::setCompositor | ( | Compositor * | value | ) |
Sets the compositor the context should be rendered with.
| value | The compositor to use. Can be reset with nullptr. |
| void nkGraphics::RenderContext::setOwnsWindow | ( | bool | value | ) |
Sets whether the context owns the window it is attached to.
| value | Whether the context owns the window (true) or not (false). |
|
pure virtual |
Sets whether the context should be gamma corrected or not.
| value | Whether the context should be gamma corrected (true) or not (false). |
|
pure virtual |
Initializes and loads all internal memory necessary.
|
pure virtual |
Part of the rendering logic. In theory, should not be called by external code.
|
pure virtual |
Callback for when the window size changes. Can also be used to resize manually the surfaces (window, texture) the context owns.
| width | The wanted width of the surface, in pixels. |
| height | The wanted height of the surface, in pixels. |
|
virtual |
Callback for when the window size changes.